<!DOCTYPE html>
<html>
{include file="head.html"}
<body>
<div class="header" >
    <a  class="left-btn pointer" href="{$appshop}"><span class="iconfont icon-back"></span></a>
    <div class="title">轮显管理</div>
 	<a href="{$appshop}?m=shop_flash&a=add" class="right-btn"><span class="iconfont icon-write"></span></a>
     
  </div>
  
  <div class="main-body">
  	<div class="plist">
  	{foreach item=c key=k from=$data}
    <div class="item">
    	<div class="g-sd1"><img src="{$c.imgurl|images_site}.100x100.jpg"></div>
        <div class="g-mn1">
        	<div class="g-mn1c">
        		<div class="title">{$c.title}</div>
                <div class="tool">  <a href="{$appshop}?m=shop_flash&a=add&id={$c.id}">编辑</a>  <a  class="delete" url="{$appshop}?m=shop_flash&a=delete&id={$c.id}">删除</a></div>
            </div>
        </div>
    </div>
    {/foreach}
    </div>
  </div>
  
 
 
 

<script language="javascript" src="/plugin/jquery/ajaxfileupload.js"></script>
<script language="javascript">
   function uploadgoodsimg(key)
    {
		var fileid="upimg"+key;
		var imgurl=$("#imgurl"+key);
		var imgShow=$("#imgShow"+key);
        $.ajaxFileUpload
        (
            {
                url:'/index.php?m=upload&a=uploadtao&dir=shop_flash&t='+Math.random(), 
                secureuri:false,
                fileElementId:fileid,
                dataType: 'json',
                success: function (data, status)
                {
                    if(typeof(data.error) != 'undefined')
                    {
                        if(data.error != '')
                        {
                           alert(data.msg);
                        }else
                        {
							imgShow.html("<img src='/"+data.imgurl+".100x100.jpg' width='50'>");
							 imgurl.val(data.imgurl);
                        }
                    }
                },
                error: function (data, status, e)
                {
					alert(data.msg)
  
                }
            }
        )
        
        return false;

    }
</script>
{include file="footer.html"}
</body>
</html>